import request from '@/utils/request'
import type { Page } from '@/api/product/type'

const base = '/product/brand'

export interface Brand {
    brandId: number | null
    name: string
    logo: string
    descript?: string
    showStatus?: boolean
    firstLetter?: string
    sort?: number

}

export function getBrandPage( params ): Promise<Page<Brand>> {
    return request.get(`${base}/page`, { params })
}

export function updateBrand( params ) {
    return request.put(`${base}`, params)
}

export function insertBrand( data: Brand ) {
    return request.post(`${base}`, data)
}